package com.xpsoft.oa.workflow.event;

import java.math.BigDecimal;

import org.jbpm.api.jpdl.DecisionHandler;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.model.OpenProcessInstance;

//判断
public class AdminContractPaymentSecondHandler implements DecisionHandler {

	@Override
	public String decide(OpenExecution execution) {
		String result = "";
		OpenProcessInstance pi = execution.getProcessInstance();
        BigDecimal applyAmount = (BigDecimal)pi.getVariable("adminContractPayment.applyAmount");
		if(applyAmount.compareTo(new BigDecimal(50000))!=-1){
			result = "金额大于等于5万";
		}else{
			result = "金额小于5万";
		}
		return result;
	}

}
